<template>
	<view>
		<!-- 用户基本资料 -->
		<view class="personal_info common">
			 <titleglobal :title="'用户资料'"></titleglobal>
			<view class="infoItem flex flexBei">
				<image :src="this.info.purikura" ></image>
				<view class="infoItem_content textHd">
					<view class="header flex flexBei ">
						<text>{{this.info.poorName}}</text>
						<text>{{this.info.poorAge}}岁</text>
					</view>
					<view class="bettwen">
						联系方式: {{this.info.poorPhone}}
					</view>
					<view class="bottom">
						居住地址: {{this.info.homeAddress}}
					</view>
				</view>
			</view>
		</view>
		<!-- 用户致贫缘由 -->
		<view class="personal_cause common">
			 <titleglobal :title="'致贫缘由'"></titleglobal>
				<view class="content">
					{{this.info.poorContent}}
				</view>
		</view>
		<view class="personal_cause common">
			 <titleglobal :title="'帮扶政策'"></titleglobal>
				<view class="content">
					暂无政策
				</view>
		</view>
		<!-- 相册集 -->
		<view class="personal_pohotoes common">
			<titleglobal :title="'相册集'"></titleglobal>
				<view class="pohotes">
					<image :src="this.info.pictureOne" ></image>
					<image :src="this.info.pictureTwo" ></image>
				</view>
		</view>
	</view>
</template>

<script>
	import  { getpovertyinfo } from '../../api/poverty.js'
	import titleglobal  from '../../components/title.vue'
	export default {
		data() {
			return {
			  id: '',
			  info: {}
			};
		},
		components:{
			titleglobal
		},
		onLoad(e) {
		  this.id = e.id
		  uni.setNavigationBarTitle({
		  	title: '贫困户详情'
		  })	
		},
		mounted() {
		  this.getPovertyInfo()	
		},
		methods:{
		  // 获取贫困户资料信息
		  async getPovertyInfo () {
			 const res = await getpovertyinfo({poorId: this.id})
			 this.info = res.data.data.data
		  }
		}
	}
</script>

<style lang="less">
	/* 公用样式 */
.common {
	background-color: #fff;
	padding: 12rpx 24rpx;
	margin-top: 36rpx;
	.content {
		color: #999;
		text-indent: 2em;
	}
}
/* 用户资料 */
.personal_info {
	.infoItem {
		padding: 24rpx;
		image {
			width: 140rpx;
			height: 140rpx;
			border-radius: 12rpx;
		}
		.infoItem_content {
			width: 480rpx;
		}
	}
}
/* 家庭基本情况 */
.personal_background {
	
}
/* 用户致贫原因 */
/* 相册集 */
.pohotes {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	image {
		width: 320rpx;
		height: 240rpx;
		border-radius: 12rpx;
	}
}
</style>
